<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>CircleU</title>
<style type="text/css">
<!--
.try {
	background-color: #FFFFFF;
	position: absolute;
	z-index: auto;
	visibility: visible;
	clip: rect(auto,auto,auto,auto);
	top: 5px;
	width: 902px;
	height: 59px;
	left: 83px;
}
.copyright {
	position: absolute;
	left: 150px;
	top: 600px;
	font-size: large;
	height: 22px;
}
.button2 {
	color: #FFFFFF;
	background-color: #0000FF;
	font-family: "Comic Sans MS";
}
.table2 {
	position: absolute;
	left: 433px;
	top: 117px;
}
.CircleU {
	font-family: "Comic Sans MS";
	font-size: xx-large;
	font-weight: bold;
	position: absolute;
	left: 105px;
	top: 21px;
}
.table {
	position: absolute;
	left: 103px;
	top: 103px;
}
#Layer1 {
	position:absolute;
	width:424px;
	height:718px;
	z-index:1;
	left: 481px;
	top: 114px;
}
.STYLE7 {font-size: small}
#RG {
	position: absolute;
	left: 34px;
	top: 116px;
}
#Title1 {
	position: absolute;
	left: 2px;
	top: 4px;
}
#Layer2 {
	position:absolute;
	width:133px;
	height:53px;
	z-index:1;
	left: 6px;
	top: 4px;
}
#Title {
	position:absolute;
	width:1092px;
	height:59px;
	z-index:1;
	left: 3px;
	top: 7px;
	background-color: #FF6600;
}
.STYLE9 {
	font-family: "Comic Sans MS";
	font-weight: bold;
	font-size: xx-large;
	color: #3333FF;
}
.STYLE11 {color: #FF0000}
-->
</style>
</head>

<body>
<div id="Title">
  <table width="1091">
    <tr>
      <td width="312" rowspan="3"><span class="STYLE9">CircleU</span></td>
      <td width="51">&nbsp;</td>
      <td width="51">&nbsp;</td>
      <td width="51">&nbsp;</td>
      <td width="51">&nbsp;</td>
      <td width="430">&nbsp;</td>
      <td width="99"><a href="ContactUs.php">Contact Us</a> </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<center><?php
include("login.php");
$checkTF=true;
if(isset($_POST['radiobutton'])){
$task = $_POST['radiobutton'];

switch( $task ) { 
    case 'student': 
       if($_POST["uname"]!="" & $_POST["pwd"]!="")$checkTF=LogInS($_POST["uname"],$_POST["pwd"]);  
	 case 'admin': 
      if($_POST["uname"]!="" & $_POST["pwd"]!="") $checkTF=LogInA($_POST["uname"],$_POST["pwd"]);
        
    default: 
        None(); 
}

}
else
None();

function None()
{ 
?>
  <div id=RG>
<form id="LogInId" name="LogIn" action="" method="post">
<table width="321" border="0">
  <tr>
    <td width="91"><div align="right">User Name : </div></td>
    <td width="220">
      <label>
        <input type="text" name="uname" />
        </label>
    </td>
  </tr>
  <tr>
    <td><div align="right">Password : </div></td>
    <td>
      <label>
        <input type="password" name="pwd" />
        </label>
       </td>
  </tr>
  <tr>
    <td height="61"><p>&nbsp;</p>
      <p><a href="#"></a></p></td>
    <td>
      <label> 
      <span class="STYLE7">
      <input type="radio" name="radiobutton" value="student" />
      Student      </span>
      <span class="STYLE7">
      <input type="radio" name="radiobutton" value="admin" />
      Admin</span><br />
      <br />
      <input name="submit" type="submit" class="button2" value="Log In" />
        <a href="ForgotPassword.php" class="STYLE7">Forget Password?</a></label></td>
  </tr>
</table>
  </form>
  </div> 
  <?php 
}



?>
</div>
  <div class="table2">
  <?php
include("register.php");

//gsession_start();
//if( isset($_SESSION["login"]))header('Location: Personal.php');
if(isset($_POST['register'])){
$task = $_POST['register'];

switch( $task ) { 
    case 'Register': 
       Register($_POST["fname"],$_POST["lname"],$_POST["uname"],$_POST["password"],$_POST["rpassword"],$_POST["birthday"],$_POST["gender"],$_POST["phone"],$_POST["college"],$_POST["department"]);  
        
    default: 
       None1(); 
}

}
else
None1();

function None1()
{ 
?>  
  <form id="form2" name="form2" method="post" action="">
    <table width="300" border="0">
      <tr>
        <td width="141" height="17"><div align="right"><span class="STYLE11">*</span>First Name: </div></td>
        <td width="143">
            <label>
            <input type="text" name="fname" />
            </label>        </td>
      </tr>
      <tr>
        <td><div align="right"><span class="STYLE11">*</span>Last Name: </div></td>
        <td>
            <label>
            <input type="text" name="lname" />
            </label>       </td>
      </tr>
      <tr>
        <td><div align="right"><span class="STYLE11">*</span>User Name: </div></td>
        <td>
            <label>
            <input type="text" name="uname" />
            </label>      </td>
      </tr>
      <tr>
        <td><div align="right"><span class="STYLE11">*</span>Password:</div></td>
        <td><input type="password" name="password" /></td>
      </tr>
      <tr>
        <td><div align="right"><span class="STYLE11">*</span>Re-password:</div></td>
        <td><input type="password" name="rpassword" /></td>
      </tr>
      <tr>
        <td><div align="right">Birthday:</div></td>
        <td><input type="text" name=" birthday" /></td>
      </tr>
      <tr>
        <td><div align="right">Gender:</div></td>
        <td><input type="text" name="gender" /></td>
      </tr>
      <tr>
        <td><div align="right">Phone:</div></td>
        <td><input type="text" name="phone" /></td>
      </tr>
      <tr>
        <td><div align="right">College:</div></td>
        <td><input type="text" name="college" /></td>
      </tr>
      <tr>
        <td><div align="right">Department:</div></td>
        <td><input type="text" name="department" /></td>
      </tr>
      <tr>
        <td>
            <label>
            <div align="right">
              <input name="clear" type="reset" class="button2" value="clear" />
            </div>
            </label>
            <div align="right"></div></td>
        <td>
            <label>
            <div align="right">
              <input name="register" type="submit" class="button2" value="Register" />
            </div>
            </label>
            <div align="right"></div></td>
      </tr>
    </table>
    </form>
	 <?php 
}



?>
 
</div>
<div class="copyright">
<p>Copyright @ 2011 CircleU built in University of Florida. All right reserved&#13;</p>

</div>
</center>
</body>
</html>
